! function(e, n) {
    if ("object" == typeof exports && "object" == typeof module) module.exports = n(require("angular"));
    else if ("function" == typeof define && define.amd) define(["angular"], n);
    else {
        var t = n("object" == typeof exports ? require("angular") : e.angular);
        for (var o in t)("object" == typeof exports ? exports : e)[o] = t[o] } }(this, function(e) {
    return function(e) {
        function n(o) {
            if (t[o]) return t[o].exports;
            var i = t[o] = { exports: {}, id: o, loaded: !1 };
            return e[o].call(i.exports, i, i.exports, n), i.loaded = !0, i.exports }
        var t = {};
        return n.m = e, n.c = t, n.p = "", n(0) }([function(e, n, t) { "use strict";

        function o(e) {
            return e && e.__esModule ? e : { default: e } }
        Object.defineProperty(n, "__esModule", { value: !0 }), n.ngBaiduMap = void 0;
        var i = t(1),
            r = o(i),
            a = t(2),
            l = o(a),
            u = t(6),
            c = o(u),
            s = t(8),
            d = o(s),
            p = t(9),
            f = o(p),
            m = t(10);
        (0, m.globalConstants)();
        var y = "baiduMap";
        r.default.module(y, []).provider("mapScriptService", f.default).component("baiduMap", l.default).component("marker", c.default).component("control", d.default);
        n.ngBaiduMap = y }, function(n, t) { n.exports = e }, function(e, n, t) { "use strict";

        function o(e) {
            if (e && e.__esModule) return e;
            var n = {};
            if (null != e)
                for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && (n[t] = e[t]);
            return n.default = e, n }

        function i(e, n) {
            if (!(e instanceof n)) throw new TypeError("Cannot call a class as a function") }

        function r(e, n) {
            for (var t = arguments.length, o = Array(t > 2 ? t - 2 : 0), i = 2; i < t; i++) o[i - 2] = arguments[i];
            return new Promise(function(t) { e[n].apply(e, o), t() }) }
        Object.defineProperty(n, "__esModule", { value: !0 });
        var a = function() {
                function e(e, n) {
                    for (var t = 0; t < n.length; t++) {
                        var o = n[t];
                        o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o) } }
                return function(n, t, o) {
                    return t && e(n.prototype, t), o && e(n, o), n } }(),
            l = t(3),
            u = o(l),
            c = t(4);
        n.default = { bindings: { offlineTxt: "<", mapOptions: "<", loaded: "&", click: "&" }, transclude: !0, template: '\n        <div ng-style="$ctrl.style.map" class="baidu-map-instance"></div>\n        <div ng-style="$ctrl.style.offline" class="baidu-map-offline">\n            <label ng-style="$ctrl.style.offlineLabel">{{ $ctrl.offlineTxt || \'NO_NETWORK\' }}</label>\n        </div>\n        <div ng-transclude style="display: none"></div>\n    ', controller: function() {
                function e(n, t, o, r) { i(this, e), this.$scope = n, this.$element = t, this.$attrs = o, this.style = u, this.mapScriptService = r }
                return e.$inject = ["$scope", "$element", "$attrs", "mapScriptService"], a(e, [{ key: "$onInit", value: function() {
                        var e = this;
                        this.mapReady = this.mapScriptService.load().then(function() {
                            return (0, c.create)(e.$element.children()[0], e.mapOptions) }).then(function(n) {
                            return e.loaded({ map: n }), e.$scope.$apply(), e.map = n }).then(function() {
                            if (e.$attrs.click) {
                                var n = e.clickListener = function(n) { e.click({ e: n }) };
                                e.map.addEventListener("click", n) } }) } }, { key: "$onChanges", value: function(e) { this.map && (0, c.refresh)(this.map, e.mapOptions.currentValue) } }, { key: "$onDestroy", value: function() { this.map.removeEventListener("click", this.clickListener) } }, { key: "addOverlay", value: function(e) {
                        return r(this.map, "addOverlay", e) } }, { key: "removeOverlay", value: function(e) {
                        return r(this.map, "removeOverlay", e) } }, { key: "addControl", value: function(e) {
                        return r(this.map, "addControl", e) } }, { key: "removeControl", value: function(e) {
                        return r(this.map, "removeControl", e) } }, { key: "getMap", value: function() {
                        return this.map } }]), e }() } }, function(e, n) { "use strict";
        Object.defineProperty(n, "__esModule", { value: !0 });
        n.map = { width: "100%", height: "100%", display: "none" }, n.offline = { width: "100%", height: "100%", backgroundColor: "#E6E6E6", position: "relative", display: "none" }, n.offlineLabel = { fontSize: "30px", margin: 0, position: "absolute", top: "50%", left: "50%", "margin-right": "-50%", transform: "translate(-50%, -50%)" } }, function(e, n, t) { "use strict";

        function o(e, n) {
            var t = new BMap.Map(e, n);
            return i(t, n), t }

        function i(e, n) {
            (0, r.isNull)(n) || (0, r.isNull)(n.disableDragging) || e[(n.disableDragging ? "disable" : "enable") + "Dragging"](), (0, r.isNull)(n) || (0, r.isNull)(n.enableScrollWheelZoom) || e[(n.enableScrollWheelZoom ? "enable" : "disable") + "ScrollWheelZoom"](), (0, r.isNull)(n) || (0, r.isNull)(n.disableDoubleClickZoom) || e[(n.disableDoubleClickZoom ? "disable" : "enable") + "DoubleClickZoom"](), (0, r.isNull)(n) || (0, r.isNull)(n.enableKeyboard) || e[(n.enableKeyboard ? "enable" : "disable") + "Keyboard"](), (0, r.isNull)(n) || (0, r.isNull)(n.enableInertialDragging) || e[(n.enableInertialDragging ? "enable" : "disable") + "InertialDragging"](), (0, r.isNull)(n) || (0, r.isNull)(n.enableContinuousZoom) || e[(n.enableContinuousZoom ? "enable" : "disable") + "ContinuousZoom"](), (0, r.isNull)(n) || (0, r.isNull)(n.disablePinchToZoom) || e[(n.disablePinchToZoom ? "disable" : "enable") + "PinchToZoom"](), !(0, r.isNull)(n) && !(0, r.isNull)(n.cursor) && e.setDefaultCursor(n.cursor), !(0, r.isNull)(n) && !(0, r.isNull)(n.draggingCursor) && e.setDraggingCursor(n.draggingCursor), !(0, r.isNull)(n) && !(0, r.isNull)(n.currentCity) && e.setCurrentCity(n.currentCity), !(0, r.isNull)(n) && !(0, r.isNull)(n.centerAndZoom) && e.centerAndZoom(new BMap.Point(n.centerAndZoom.longitude || a.longitude, n.centerAndZoom.latitude || a.latitude), n.centerAndZoom.zoom || l) }
        Object.defineProperty(n, "__esModule", { value: !0 }), n.create = o, n.refresh = i;
        var r = t(5),
            a = { longitude: 121.506191, latitude: 31.245554 },
            l = 10 }, function(e, n) { "use strict";

        function t(e, n) {
            if (i(e)) throw new Error(n) }

        function o(e, n) {
            if (r(e)) throw new Error(n) }

        function i(e) {
            return null === e || void 0 === e }

        function r(e) {
            return "[object Number]" === Object.prototype.toString.call(e) }

        function a(e) {
            return "[object Array]" === Object.prototype.toString.call(e) }

        function l(e) {
            if (u.indexOf((e || "").toLowerCase()) < 0) throw new Error("control type should be one of: ['navigation', 'overviewmap', 'scale', 'maptype', 'copyright', 'geolocation']") }
        Object.defineProperty(n, "__esModule", { value: !0 }), n.nullCheck = t, n.numberCheck = o, n.isNull = i, n.isNumber = r, n.isArray = a, n.controlTypeCheck = l;
        var u = ["navigation", "overviewmap", "scale", "maptype", "copyright", "geolocation", "panorama"] }, function(e, n, t) { "use strict";

        function o(e, n) {
            if (!(e instanceof n)) throw new TypeError("Cannot call a class as a function") }

        function i(e) {
            var n = JSON.parse(JSON.stringify(e || {}));
            return n.offset && (n.offset = (0, l.transformSize)(n.offset, "<marker> options.offset")), n.icon && (n.icon = (0, l.transformIcon)(n.icon, "<marker> options.icon")), n.shadow && (n.shadow = (0, l.transformIcon)(n.shadow, "<marker> options.shadow")), n }
        Object.defineProperty(n, "__esModule", { value: !0 });
        var r = function() {
                function e(e, n) {
                    for (var t = 0; t < n.length; t++) {
                        var o = n[t];
                        o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o) } }
                return function(n, t, o) {
                    return t && e(n.prototype, t), o && e(n, o), n } }(),
            a = t(5),
            l = t(7);
        n.default = { bindings: { point: "<", options: "<", click: "&" }, require: { mapCtrl: "^baiduMap" }, template: "", controller: function() {
                function e(n, t) { o(this, e), this.$scope = n, this.$attrs = t }
                return e.$inject = ["$scope", "$attrs"], r(e, [{ key: "$onInit", value: function() {
                        var e = this;
                        (0, a.nullCheck)(this.point, "point is required for <marker>"), this.mapCtrl.mapReady.then(function() {
                            var n = (0, l.transformPoint)(e.point, "<marker> point"),
                                t = i(e.options),
                                o = e.marker = new BMap.Marker(n, t);
                                var label = new BMap.Label(e.point.label,{offset:new BMap.Size(20,-10)});
                                o.setLabel(label);
                            return e.mapCtrl.addOverlay(o), o }).then(function(n) { e.$attrs.click && (e.clickHandler = function(t) { e.click({ e: t, marker: n, map: e.mapCtrl.getMap() }), e.$scope.$apply() }, n.addEventListener("click", e.clickHandler)) }) } }, { key: "$onDestroy", value: function() { this.marker.removeEventListener("click", this.clickHandler), this.mapCtrl.removeOverlay(this.marker) } }]), e }() } }, function(e, n, t) { "use strict";

        function o(e, n) {
            var t = { url: e.url };
            return (0, a.nullCheck)(e.url, "url is required in " + n), (0, a.nullCheck)(e.size, "size is required in " + n), t.size = i(e.size, n + ".size"), new BMap.Icon(t.url, t.size) }

        function i(e, n) {
            return (0, a.nullCheck)(e.width, "width is required in " + n), (0, a.nullCheck)(e.height, "height is required in " + n), new BMap.Size(e.width, e.height) }

        function r(e, n) {
            return (0, a.nullCheck)(e.longitude, "longitude is required in " + n), (0, a.nullCheck)(e.latitude, "latitude is required in " + n), new BMap.Point(e.longitude, e.latitude) }
        Object.defineProperty(n, "__esModule", { value: !0 }), n.transformIcon = o, n.transformSize = i, n.transformPoint = r;
        var a = t(5) }, function(e, n, t) { "use strict";

        function o(e, n) {
            if (!(e instanceof n)) throw new TypeError("Cannot call a class as a function") }

        function i(e, n) {
            if ("navigation" === e) return new BMap.NavigationControl(n);
            if ("overviewmap" === e) return new BMap.OverviewMapControl(n);
            if ("scale" === e) return new BMap.ScaleControl(n);
            if ("maptype" === e) return new BMap.MapTypeControl(n);
            if ("copyright" === e) {
                var t = function() {
                    var e = new BMap.CopyrightControl(n);
                    return (0, l.isArray)(n.copyrights) && n.copyrights.forEach(function(n) { e.addCopyright(n) }), { v: e } }();
                if ("object" === ("undefined" == typeof t ? "undefined" : r(t))) return t.v }
            return "geolocation" === e ? new BMap.GeolocationControl(n) : "panorama" === e ? new BMap.PanoramaControl(n) : void 0 }
        Object.defineProperty(n, "__esModule", { value: !0 });
        var r = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
                return typeof e } : function(e) {
                return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e },
            a = function() {
                function e(e, n) {
                    for (var t = 0; t < n.length; t++) {
                        var o = n[t];
                        o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o) } }
                return function(n, t, o) {
                    return t && e(n.prototype, t), o && e(n, o), n } }(),
            l = t(5);
        n.default = { bindings: { type: "@", options: "<" }, require: { mapCtrl: "^baiduMap" }, template: "", controller: function() {
                function e() { o(this, e) }
                return a(e, [{ key: "$onInit", value: function() {
                        var e = this;
                        (0, l.controlTypeCheck)(this.type), this.mapCtrl.mapReady.then(function() {
                            var n = e.control = i(e.type.toLowerCase(), e.options);
                            return e.mapCtrl.addControl(n), n }) } }, { key: "$onDestroy", value: function() { this.mapCtrl.removeControl(this.control) } }]), e }() } }, function(e, n, t) { "use strict";

        function o(e) {
            var n = document.createElement("script");
            n.type = "text/javascript", n.src = e, n.onerror = function() { Array.prototype.slice.call(document.querySelectorAll("baidu-map .baidu-map-offline")).forEach(function(e) { e.style.display = "block" }), document.body.removeChild(n), setTimeout(function() { o(e) }, 3e4) }, document.body.appendChild(n) }

        function i() {
            return Array.prototype.slice.call(document.querySelectorAll("baidu-map")).forEach(function(e) { e.querySelector(".baidu-map-offline") && e.removeChild(e.querySelector(".baidu-map-offline")), e.querySelector(".baidu-map-instance").style.display = "block" }) }
        Object.defineProperty(n, "__esModule", { value: !0 }), n.default = function() {
            var e = null,
                n = void 0;
            this.setKey = function(t) { e = t, n = "//api.map.baidu.com/api?v=2.0&ak=" + e + "&callback=baidumapinit&s=" + ("https:" === location.protocol ? 1 : 0) }, this.$get = ["$rootScope", function(t) { "ngInject";
                return { load: function() {
                        (0, r.nullCheck)(e, "ak should be set before use. Read: https://leftstick.github.io/BaiduMapForAngularJS/#!/quickstart");
                        var a = t.loadBaiduMapPromise;
                        return a ? a.then(i) : t.loadBaiduMapPromise = new Promise(function(e, t) { window.baidumapinit = e, o(n) }).then(i) } } }] };
        var r = t(5) }, function(e, n) { "use strict";

        function t() { window.BMAP_ANCHOR_TOP_LEFT = 0, window.BMAP_ANCHOR_TOP_RIGHT = 1, window.BMAP_ANCHOR_BOTTOM_LEFT = 2, window.BMAP_ANCHOR_BOTTOM_RIGHT = 3, window.BMAP_NAVIGATION_CONTROL_LARGE = 0, window.BMAP_NAVIGATION_CONTROL_SMALL = 1, window.BMAP_NAVIGATION_CONTROL_PAN = 2, window.BMAP_NAVIGATION_CONTROL_ZOOM = 3, window.BMAP_UNIT_METRIC = "metric", window.BMAP_UNIT_IMPERIAL = "us", window.BMAP_MAPTYPE_CONTROL_HORIZONTAL = 0, window.BMAP_MAPTYPE_CONTROL_DROPDOWN = 1, window.BMAP_MAPTYPE_CONTROL_MAP = 2, window.BMAP_ANIMATION_DROP = 1, window.BMAP_ANIMATION_BOUNCE = 2, window.BMAP_POINT_SIZE_TINY = 1, window.BMAP_POINT_SIZE_SMALLER = 2, window.BMAP_POINT_SIZE_SMALL = 3, window.BMAP_POINT_SIZE_NORMAL = 4, window.BMAP_POINT_SIZE_BIG = 5, window.BMAP_POINT_SIZE_BIGGER = 6, window.BMAP_POINT_SIZE_HUGE = 7, window.BMAP_PANORAMA_INDOOR_SCENE = "inter", window.BMAP_PANORAMA_STREET_SCENE = "street", window.BMAP_PANORAMA_POI_HOTEL = "hotel", window.BMAP_PANORAMA_POI_CATERING = "catering", window.BMAP_PANORAMA_POI_MOVIE = "movie", window.BMAP_PANORAMA_POI_TRANSIT = "transit", window.BMAP_PANORAMA_POI_INDOOR_SCENE = "indoor_scene", window.BMAP_PANORAMA_POI_NONE = "none" }
        Object.defineProperty(n, "__esModule", { value: !0 }), n.globalConstants = t }]) });
